<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">


    <div class="form-group">
        <label class="col-xs-12 col-sm-2">店铺名称:</label>
        <div class="col-xs-12 col-sm-4">
           {if $row.super_play_no>0}<strong style="color:red">循环|</strong>{/if}
           {if $firstRelease==0}<strong style="color:red">首发|</strong>{/if}
           <span>{$shop.shop_name}</span>
           <a href="javascript:;" class="copy">   复制</a>
        </div>
        <label class="col-xs-12 col-sm-2">店铺地址:</label>
        <div class="col-xs-12 col-sm-4">
            <span>{$shop.address}</span><a href="javascript:;" class="copy">   复制</a>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-2">店铺二维码:</label>
        <div class="col-xs-12 col-sm-4">
            <a href="{$row.create_by}" target="_blank">
                <img src="{$row.create_by}" style="width: 100px;height: 100px;">
            </a>
        </div>
        <label class="col-xs-12 col-sm-2">活动平台:</label>
        <div class="col-xs-12 col-sm-4">
            {$shop.shop_type_text}
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-2">活动餐标:</label>
        <div class="col-xs-12 col-sm-4">
            {$back_money_text}
        </div>
        <label class="col-xs-12 col-sm-2">出单名额:</label>
        <div class="col-xs-12 col-sm-4">
            {$play_channel_quota.quota}
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-2">活动方案:</label>
        <div class="col-xs-12 col-sm-4">
            {$row.scheme_no_text}
        </div>
        <label class="col-xs-12 col-sm-2">活动日期:</label>
        <div class="col-xs-12 col-sm-4">
            {$row.start_date}至{$row.end_date}
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-2">活动时间:</label>
        <div class="col-xs-12 col-sm-4">
            {$row.start_time_str}-{$row.end_time_str}
        </div>
        <label class="col-xs-12 col-sm-2">渠道业务员:</label>
        <div class="col-xs-12 col-sm-4">
            {$play_channel_quota.connector}
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-2">操作状态:</label>
        <div class="col-xs-12 col-sm-4">
            {$play_channel_quota.operate_status}
        </div>
        <label class="col-xs-12 col-sm-2">更新时间:</label>
        <div class="col-xs-12 col-sm-4">
            {$row.update_dt}
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-2">下单限制:</label>
        <div class="col-xs-12 col-sm-4">
            {if $row.times_limit==1}
                每{$row.jt}天{$row.jc}次
            {else /}
                无限制
            {/if}
        </div>
    </div>
    {if $play_channel_quota.operate_status=='未处理'}
    <div class="form-group">
        <label class="col-xs-12 col-sm-2">出单名额:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quota" data-rule="required" class="form-control" name="row[quota]" type="number">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed">{:__('OK')}</button>
        </div>
    </div>
    {/if}
</form>


<script src="__CDN__/assets/libs/jquery/dist/jquery.min.js"></script>
<script>
    $('.copy').click(function (e) {
        var text = $(this).siblings('span').text();
        console.log(text)
        copyToClipboard_js(text)
        Toastr.success("复制成功")
    })
    function copyToClipboard_js(txt) {
        var temp = document.createElement("textarea"); //声明创建一个input元素
        document.body.appendChild(temp); //在body中追加input元素
        temp.value = txt; //把要复制的文字赋予input元素
        temp.select(); //选择要复制的文字
        document.execCommand("copy"); //把文字复制到剪贴板
        document.body.removeChild(temp); //移除body追加的input元素
    }
</script>
